<style>
    #hazardReportAudit-edit .layui-input-block {
        margin-left: 124px;
    }

    #hazardReportAudit-edit .layui-form-label {
        width: 94px;
    }
</style>
<div class="febs-container" id="hazardReportAudit-edit">
    <div class="febs-open-body">
        <form class="layui-form" action="" lay-filter="hazardReportAudit-edit-form">
            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">基本信息</blockquote>
                <div class="layui-card-body">
                    <div class="layui-form-item febs-hide">
                        <div class="layui-row">
                            <div class="layui-col-xs6">
                                <label class="layui-form-label febs-form-item-require">隐患信息id：</label>
                                <div class="layui-input-block ">
                                    <input type="text" name="reportId" class="layui-input" th:value="${hazardReport.reportId}">
                                </div>
                            </div>
                            <div class="layui-col-xs6">
                                <label class="layui-form-label febs-form-item-require">公司Id：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="tenantId" autocomplete="off" class="layui-input"
                                           maxlength="32"  th:value="${hazardReport.tenantId}">
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label layui-form-label-detail">隐患单号：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.reportNo}"></div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">公司名称：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.tenantName}"></div>
                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">项目名称：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.projectName}"></div>
                        </div>

                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">位置区域：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.areaName}"></div>
                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">隐患类型：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.hazardOperation}"></div>

                        </div>

                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label layui-form-label-detail">隐患图片：</label>
                            <div class="layui-input-block">
                                <div id="haazardFiles" style="height: 120px ;width: 100%">
                                </div>
                            </div>
                        </div>

                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label layui-form-label-detail">隐患描述：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.hazardDescription}"></div>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">整改计划</blockquote>
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">责任人：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.leaderName}"></div>
                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">所属部门：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.leaderDeptName}"></div>

                        </div>

                    </div>

                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">员工工号：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.leaderNo}"></div>

                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">不安全行为：</label>
                            <div class="layui-input-block layui-input-block-html" id="unsafeName" th:text="${hazardReport.unsafeName}"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-col-md12">
                            <label class="layui-form-label layui-form-label-detail">整改措施：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.rectificationMeasures}"></div>
                        </div>
                    </div>

                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">制定人：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.planUserDeptName}"></div>

                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">制定时间：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.planDate}"></div>
                        </div>
                    </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">截止时间：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.rectificationDate}"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">整改反馈</blockquote>
                <div class="layui-card-body">

                        <div class="layui-form-item">
                            <div class="layui-col-md12">
                                <label class="layui-form-label layui-form-label-detail">整改图片：</label>
                                <div class="layui-input-block">
                                    <div id="feedBackImgView" style="height: 120px ;width: 100%">
                                    </div>
                                </div>
                            </div>
                        </div>

                        <div class="layui-form-item">
                            <div class="layui-col-md12">
                                <label class="layui-form-label layui-form-label-detail">整改反馈：</label>
                                <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.feedbackContent}"></div>
                            </div>
                        </div>
                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">反馈人：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.leaderName}"></div>

                        </div>
                        <div class="layui-col-md6">
                            <label class="layui-form-label layui-form-label-detail">反馈时间：</label>
                            <div class="layui-input-block layui-input-block-html" th:text="${hazardReport.feedbackDate}"></div>
                        </div>
                    </div>
                    </div>
            </div>

            <div th:if="${hazardReport.planRecordList} and ${hazardReport.planRecordList.size() > 0}">
                <div class="layui-card">
                    <blockquote class="layui-elem-quote layui-elem-quote-primary" >制定记录</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <table lay-filter="hazardReportPlanRecordTable" id="hazardReportPlanRecordTable" lay-data="{id: 'hazardReportPlanRecordTable'}"></table>
                        </div>
                    </div>
                </div>
            </div>
            <div th:if="${hazardReport.feedBackRecordList} and ${hazardReport.feedBackRecordList.size() > 0}">
                <div class="layui-card">
                    <blockquote class="layui-elem-quote layui-elem-quote-primary" >整改反馈记录</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <table lay-filter="hazardReportFeedBackRecordTable" id="hazardReportFeedBackRecordTable" lay-data="{id: 'hazardReportFeedBackRecordTable'}"></table>
                        </div>
                    </div>
                </div>
            </div>
            <div th:if="${hazardReport.auditRecordList} and ${hazardReport.auditRecordList.size() > 0}">
                <div class="layui-card">
                    <blockquote class="layui-elem-quote layui-elem-quote-primary" >审核记录</blockquote>
                    <div class="layui-card-body">
                        <div class="layui-form-item">
                            <table lay-filter="hazardReportAuditRecordTable" id="hazardReportAuditRecordTable" lay-data="{id: 'hazardReportAuditRecordTable'}"></table>
                        </div>
                    </div>
                </div>
            </div>

            <div class="layui-card">
                <blockquote class="layui-elem-quote layui-elem-quote-primary">整改审核</blockquote>
                <div class="layui-card-body">
                    <div class="layui-form-item">
                        <div class="layui-col-md6">
                            <label class="layui-form-label">审核意见：</label>
                            <div class="layui-input-block" >
                                <input type="radio" name="status" title="审核" lay-filter="auditStatus" value="6" checked>
                                <input type="radio" name="status" title="退回" lay-filter="auditStatus" value="13">
                            </div>
                        </div>
                    </div>
                    <div id="auditInfo">
                        <div class="layui-form-item">
                            <div class="layui-col-md6">
                                <label class="layui-form-label febs-form-item-require">奖励积分：</label>
                                <div class="layui-input-block">
                                    <input type="text" name="bonusPoints" autocomplete="off" class="layui-input"
                                           lay-verify="number|required"  placeholder="请输入奖励积分"
                                           data-th-value="${singleScore}" min="0"
                                           onkeyup="value=value.replace(/[^\d{1,}\d{1,}|\d{1,}]/g,'').replace(/\./g,'').replace(/^(\-)*(\d+)\.(\d\d).*$/,'$1$2.$3')">
                                </div>
                            </div>
                            <div class="layui-col-md6">

                                <div class="layui-input-block">
                                    <label class="layui-form-label febs-form-item-require">Nearmiss：</label>
                                    <div class="layui-input-block">
                                        <input type="checkbox" name="nearmissFlg" lay-skin="switch" lay-text="是|否">
                                    </div>
                                </div>
                            </div>
                        </div>
                        <div class="layui-form-item">
                            <div class="layui-col-md12">
                                <label class="layui-form-label" id="audiRemarkLabel">审核备注：</label>
                                <div class="layui-input-block">
                                <textarea type="text" name="auditRemark" autocomplete="off" class="layui-textarea" minlength="2"
                                  maxlength="800" placeholder="请输入审核备注" ></textarea>

                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="febs-hide" id="auditRebackInfo" >
                        <div class="layui-form-item">
                            <div class="layui-col-md12">
                                <label class="layui-form-label febs-form-item-require">退回理由：</label>
                                <div class="layui-input-block">
                                <textarea type="text" name="auditReason" autocomplete="off" class="layui-textarea" minlength="2"
                                          maxlength="800" placeholder="请输入退回理由" ></textarea>
                                </div>
                            </div>
                        </div>
                    </div>

                </div>
            </div>



            <div class="layui-form-item febs-hide">
                <button class="layui-btn" lay-submit="" lay-filter="hazardReportAudit-edit-form-submit"
                        id="submit"></button>
                <button type="reset" class="layui-btn" id="reset"></button>
            </div>
        </form>
    </div>
</div>
<script data-th-inline="javascript">
    var hazardReport = [[${hazardReport}]];
    var currentTenantId = [[${currentTenantId}]];
</script>
<script th:src="@{/febs/js/hazard/hazardReportAudit/hazardReportAuditEdit.js(v=1)}"></script>
